#include "cfg_drive.h"
#include <main.h>

/*
引脚配置表格，和引脚枚举一一对应
*/
MotorPinConfig MotorPinConfigTable[4][Count] = {
    {
        {SLP, SLP1_Pin, SLP1_GPIO_Port},
        {SLP_SLC1, SLP1_SCL1_Pin, SLP1_SCL1_GPIO_Port},
        {SLP_SLC2, SLP1_SLC2_Pin, SLP1_SLC2_GPIO_Port},
        {SLP_SLC3, SLP1_SLC3_Pin, SLP1_SLC3_GPIO_Port},
        {EN_CTR, EN1_Pin, EN1_GPIO_Port},
        {IN_CH1, IN_CH1_Pin, IN_CH1_GPIO_Port},
        {IN_CH2, IN_CH2_Pin, IN_CH2_GPIO_Port},
        {IN_CH3, IN_CH3_Pin, IN_CH3_GPIO_Port},
        {IN_CH4, IN_CH4_Pin, IN_CH4_GPIO_Port},
        {PWR_ON, PWR_ON1_Pin, PWR_ON1_GPIO_Port},
        {ADC_NSS, ADC1_NSS_Pin, ADC1_NSS_GPIO_Port},
        {ADC_SCK, ADC1_SCK_Pin, ADC1_SCK_GPIO_Port},
        {ADC_MISO, ADC1_MISO_Pin, ADC1_MISO_GPIO_Port},
        {ADC_MOSI, ADC1_MOSI_Pin, ADC1_MOSI_GPIO_Port},
    },
    {
        {SLP, SLP2_Pin, SLP2_GPIO_Port},
        {SLP_SLC1, SLP2_SLC1_Pin, SLP2_SLC1_GPIO_Port},
        {SLP_SLC2, SLP2_SLC2_Pin, SLP2_SLC2_GPIO_Port},
        {SLP_SLC3, SLP2_SLC3_Pin, SLP2_SLC3_GPIO_Port},
        {EN_CTR, EN2_Pin, EN2_GPIO_Port},
        {IN_CH1, IN_CH5_Pin, IN_CH5_GPIO_Port},
        {IN_CH2, IN_CH6_Pin, IN_CH6_GPIO_Port},
        {IN_CH3, IN_CH7_Pin, IN_CH7_GPIO_Port},
        {IN_CH4, IN_CH8_Pin, IN_CH8_GPIO_Port},
        {PWR_ON, PWR_ON2_Pin, PWR_ON2_GPIO_Port},
        {ADC_NSS, ADC2_NSS_Pin, ADC2_NSS_GPIO_Port},
        {ADC_SCK, ADC2_SCK_Pin, ADC2_SCK_GPIO_Port},
        {ADC_MISO, ADC2_MISO_Pin, ADC2_MISO_GPIO_Port},
        {ADC_MOSI, ADC2_MOSI_Pin, ADC2_MOSI_GPIO_Port},
    },
    {
        {SLP, SLP3_Pin, SLP3_GPIO_Port},
        {SLP_SLC1, SLP3_SLC1_Pin, SLP3_SLC1_GPIO_Port},
        {SLP_SLC2, SLP3_SLC2_Pin, SLP3_SLC2_GPIO_Port},
        {SLP_SLC3, SLP3_SLC3_Pin, SLP3_SLC3_GPIO_Port},
        {EN_CTR, EN3_Pin, EN3_GPIO_Port},
        {IN_CH1, IN_CH9_Pin, IN_CH9_GPIO_Port},
        {IN_CH2, IN_CH10_Pin, IN_CH10_GPIO_Port},
        {IN_CH3, IN_CH11_Pin, IN_CH11_GPIO_Port},
        {IN_CH4, IN_CH12_Pin, IN_CH12_GPIO_Port},
        {PWR_ON, PWR_ON3_Pin, PWR_ON3_GPIO_Port},
        {ADC_NSS, ADC3_NSS_Pin, ADC3_NSS_GPIO_Port},
        {ADC_SCK, ADC3_SCK_Pin, ADC3_SCK_GPIO_Port},
        {ADC_MISO, ADC3_MISO_Pin, ADC3_MISO_GPIO_Port},
        {ADC_MOSI, ADC3_MOSI_Pin, ADC3_MOSI_GPIO_Port},
    },
    {
        {SLP, SLP4_Pin, SLP4_GPIO_Port},
        {SLP_SLC1, SLP4_SLC1_Pin, SLP4_SLC1_GPIO_Port},
        {SLP_SLC2, SLP4_SLC2_Pin, SLP4_SLC2_GPIO_Port},
        {SLP_SLC3, SLP4_SLC3_Pin, SLP4_SLC3_GPIO_Port},
        {EN_CTR, EN4_Pin, EN4_GPIO_Port},
        {IN_CH1, IN_CH13_Pin, IN_CH13_GPIO_Port},
        {IN_CH2, IN_CH14_Pin, IN_CH14_GPIO_Port},
        {IN_CH3, IN_CH15_Pin, IN_CH15_GPIO_Port},
        {IN_CH4, IN_CH16_Pin, IN_CH16_GPIO_Port},
        {PWR_ON, PWR_ON4_Pin, PWR_ON4_GPIO_Port},
        {ADC_NSS, ADC4_NSS_Pin, ADC4_NSS_GPIO_Port},
        {ADC_SCK, ADC4_SCK_Pin, ADC4_SCK_GPIO_Port},
        {ADC_MISO, ADC4_MISO_Pin, ADC4_MISO_GPIO_Port},
        {ADC_MOSI, ADC4_MOSI_Pin, ADC4_MOSI_GPIO_Port},
    },
};
